#include <iostream>
#include <string>
#include <set>
#include <algorithm>

using namespace std;

struct sCmp
{
    bool operator () (const string &lhs, const string &rhs)
    {
        return lhs.size() < rhs.size();
    }
};

int main()
{
    set<string, sCmp> sets;
    sets.insert(string("hello"));
    sets.insert(string("world"));
    for (auto s : sets)
    {
        cout << s << endl;
    }

    //==
    auto it = std::find(sets.begin(), sets.end(), "hello");

    return 0;
}
